package kr.co.hk.coupon;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.Looper;

public class MyThread extends Thread {
	 ProgressDialog mProgress;
	  Looper mLoop;
	 Context mContext;
	 MyThread(Context context){
		 mContext = context;
	 }
		public void run(){
			Looper.prepare();
			mProgress = new ProgressDialog(mContext);
			mProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
			mProgress.setMessage("Now loading..");
			mProgress.setCancelable(false);
		    mProgress.show();
		    mLoop = Looper.myLooper();
			Looper.loop();
		}
		
	static  void stops(MyThread my){
		 my.mProgress.dismiss();
		 try{
			 Thread.sleep(100);
		 }catch (InterruptedException e){
			 ;
		 }
		 my.mLoop.quit();
	  }
}